package com.fary.beans.factory.config;

import com.fary.core.SpringException;
import com.fary.beans.PropertyValues;

import java.beans.PropertyDescriptor;

public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {

	default Object postProcessBeforeInstantiation(Class<?> beanClass, String beanName) throws SpringException {
		return null;
	}

	default boolean postProcessAfterInstantiation(Object bean, String beanName) throws SpringException {
		return true;
	}

	default PropertyValues postProcessProperties(PropertyValues pvs, Object bean, String beanName) throws SpringException {
		return null;
	}

	@Deprecated
	default PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDescriptor[] pds, Object bean, String beanName) throws SpringException {
		return pvs;
	}

}